import VueRouter from 'vue-router'
import home from './components/tabber/Home.vue'
import cate from './components/tabber/Cate.vue'
import cart from './components/tabber/Cart.vue'
import user from './components/tabber/User.vue'
import brand from './components/subcomponents/brand.vue'
import search from './components/search/search.vue'
import searchInfo from './components/search/goodInfo.vue'
import register from './components/reg/reg.vue'
import login from './components/reg/login.vue'
import editpwd from './components/user/editpassword.vue'
import address from './components/user/address.vue'
import add from './components/user/addaddress.vue'
import editaddress from './components/user/editaddress.vue'
import gooddetail from './components/good/goodDetail.vue'

var router = new VueRouter({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component:home},
        {path:'/cate',component:cate,children:[
                {path:'nz',component:brand},
            ]},
        {path:'/cart',component:cart},
        {path:'/user',component:user},
        {path:'/search',component:search},
        {path:'/searchInfo',component:searchInfo},
        {path:'/register',component:register},
        {path:'/login',component:login},
        {path:'/user/editpwd/:id',component:editpwd},
        {path:'/user/address/:id',component:address},
        {path:'/user/addaddress/:id',component:add},
        {path:'/user/editaddress/:id/:user_id',component:editaddress},
        {path:'/gooddetail/:id',component:gooddetail}
    ],
    linkActiveClass:'tabber-active'
});
export default router